<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>用户登录</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<style type="text/css">
td {
	color: green;
	/* background-color: black; */
	table-layout: fixed
}
</style>
<script type="text/javascript">
	function deng() {
		var name = document.getElementById("name").value;
		var password = document.getElementById("password").value;
		if (name.length == 0) {
			alert("用户名不能为空！");
		} else if (password.length == 0) {
			alert("密码不能为空！");
		} else {
			submit();
		}
		return false;
	}
	function showTime() {
		var tDate = new Date();
		var tseconds = tDate.getSeconds();
		if (tseconds < 10)
			tseconds = '0' + tseconds;
		var timeStr1 = tDate.getFullYear() + "-" + (tDate.getMonth() + 1) + "-"
				+ tDate.getDate();
		var timeStr2 = tDate.getHours() + ':' + tDate.getMinutes() + ':'
				+ tseconds;
		document.getElementById('time1').innerHTML = timeStr1;
		document.getElementById('time2').innerHTML = timeStr2;
		setTimeout(showTime, 1000);
	}
</script>
</head>



<body class="blue-style" onload="showTime()">
	<div id="login">
		<div class="icon"></div>
		<div class="login-box">
			<form name="Login" method="post" action="Login?num=1"
				onsubmit="return deng();">
				<dl>
					<dt>用户名</dt>
					<dd>
						<input type="text" class="input-text" id="name" name="name"
							onkeyup="value=value.replace(/[^0-9a-zA-Z]/g,'')" />
					</dd>
					<dt>密码</dt>
					<dd>
						<input type="password" class="input-text" id="password"
							name="password" onkeyup="this.value=this.value.replace(/\D/g,'')">
					</dd>
				</dl>
				<div class="buttons">
					<input type="submit" name="submit" value="登录系统"
						class="input-button" /> <input type="reset" name="reset"
						value="重　　填" class="input-button" />
				</div>
			</form>
			<table align="center">
				<tr>
					<c:if test="${flag!=null}">
						<td align="center">${flag}</td>
					</c:if>
				</tr>
			</table>
			</br> </br>
			<hr width="500">
			</br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一个小小网站 , All Rights Reserved
			</br>
		</div>
	</div>
</body>
</html>
